﻿using System;

namespace DesignPattern.com.state.scene {
    public class MenuState :SceneState{
        public MenuState(SceneController sc) : base(sc){
            StateName = "menuState";
            
        }

        public override void stateBegin(){
            Console.WriteLine("==MenuState-stateBegin()");
            onStartGameBtn();
        }

        private void onStartGameBtn(){
            Console.WriteLine("==menuState-onStartGameBtn()  状态切换为battleState");
            sc.setState(new BattleState(sc), "battleState" );
        }
    }
}